package dominion.player;

import dominion.Dominion;
import dominion.kingdom.Remodel;

public class OneRemodelPlayer extends TresureOnlyPlayer {

	boolean buy = false;

	public OneRemodelPlayer(Dominion dominion) {
		this("OneRemodel", dominion);
	}

	public OneRemodelPlayer(String name, Dominion dominion) {
		super(name, dominion);
	}

	@Override
	public int buy(Dominion dominion, int value) {
		if (buy == false && 3 < value) {
			dominion.buy(this, new Remodel());
			buy = true;
		} else {
			super.buy(dominion, value);
		}
		return 0;
	}

}
